package com.yangjie.autotest.hpsa.domain;

import java.util.Date;
import java.util.List;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="audit_record")
public class AuditMessage {
	@Id
	private int AUDIT_ID = 0;
	private String hostname = null;
	private String EVENT_TYPE = null;
	private Date DATE_TIME = null;
	private int JOB_ID = 0;
	private String USER_NAME = null;
	private String WORKFLOW_NAME = null;
	private String STEP_NAME = null;
	private String MESSAGE = null;
	private String IDENTIFIER = null;
	private String CLASS = null;
	private String ORDER_ID = null;
	private String WORKFLOW_TYPE = null;
	private String WORKFLOW_STATE = null;
	
	@OneToMany(fetch = FetchType.EAGER)
	@JoinColumn(name = "AUDIT_ID")
	private List<AuditMessageParam> params = null;
	
	
	public List<AuditMessageParam> getParams() {
		return params;
	}
	public void setParams(List<AuditMessageParam> params) {
		this.params = params;
	}
	public int getAUDIT_ID() {
		return AUDIT_ID;
	}
	public void setAUDIT_ID(int aUDIT_ID) {
		AUDIT_ID = aUDIT_ID;
	}
	public String getHostname() {
		return hostname;
	}
	public void setHostname(String hostname) {
		this.hostname = hostname;
	}
	public String getEVENT_TYPE() {
		return EVENT_TYPE;
	}
	public void setEVENT_TYPE(String eVENT_TYPE) {
		EVENT_TYPE = eVENT_TYPE;
	}
	public Date getDATE_TIME() {
		return DATE_TIME;
	}
	public void setDATE_TIME(Date dATE_TIME) {
		DATE_TIME = dATE_TIME;
	}
	public int getJOB_ID() {
		return JOB_ID;
	}
	public void setJOB_ID(int jOB_ID) {
		JOB_ID = jOB_ID;
	}
	public String getUSER_NAME() {
		return USER_NAME;
	}
	public void setUSER_NAME(String uSER_NAME) {
		USER_NAME = uSER_NAME;
	}
	public String getWORKFLOW_NAME() {
		return WORKFLOW_NAME;
	}
	public void setWORKFLOW_NAME(String wORKFLOW_NAME) {
		WORKFLOW_NAME = wORKFLOW_NAME;
	}
	public String getSTEP_NAME() {
		return STEP_NAME;
	}
	public void setSTEP_NAME(String sTEP_NAME) {
		STEP_NAME = sTEP_NAME;
	}
	public String getMESSAGE() {
		return MESSAGE;
	}
	public void setMESSAGE(String mESSAGE) {
		MESSAGE = mESSAGE;
	}
	public String getIDENTIFIER() {
		return IDENTIFIER;
	}
	public void setIDENTIFIER(String iDENTIFIER) {
		IDENTIFIER = iDENTIFIER;
	}
	public String getCLASS() {
		return CLASS;
	}
	public void setCLASS(String cLASS) {
		CLASS = cLASS;
	}
	public String getORDER_ID() {
		return ORDER_ID;
	}
	public void setORDER_ID(String oRDER_ID) {
		ORDER_ID = oRDER_ID;
	}
	public String getWORKFLOW_TYPE() {
		return WORKFLOW_TYPE;
	}
	public void setWORKFLOW_TYPE(String wORKFLOW_TYPE) {
		WORKFLOW_TYPE = wORKFLOW_TYPE;
	}
	public String getWORKFLOW_STATE() {
		return WORKFLOW_STATE;
	}
	public void setWORKFLOW_STATE(String wORKFLOW_STATE) {
		WORKFLOW_STATE = wORKFLOW_STATE;
	}
	
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("ORDER_ID=").append(ORDER_ID).append(",");
		sb.append("ACTION=").append(EVENT_TYPE).append(",");
		sb.append("STATUS=").append(WORKFLOW_STATE).append(",");
		sb.append("MSISDN=").append(IDENTIFIER).append(",");
		sb.append("IMSI=").append(WORKFLOW_TYPE).append(",");
		sb.append("NE=").append(STEP_NAME).append(",");
		sb.append("DATE=").append(DATE_TIME);
		return sb.toString();
	}
	
}
